<?php
require_once('../../config/config.inc');
header('Content-Type: text/html; charset=utf-8');
//Connect to mysql server
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {
	die('Failed to connect to server: ' . mysql_error());
}

//Select database
$db = mysql_select_db(DB_DATABASE);
if(!$db) {
	die("Unable to select database");
}

$qry = mysql_query("DELETE FROM `scholars` WHERE id='".$_GET['id']."'");
if($qry){
	header("Location: ../index.php#collapseFour");
}
else{
	echo mysql_error();
}